package com.ellecity06.common.utils

import android.widget.Toast
import com.hjq.toast.Toaster

/**
 * @author zavier
 * @time 2022/6/2 9:08
 * @des 吐司工具类，多次提示只会显示一个，允许子线程操作
 */
object ToastUtils {

    @JvmOverloads
    @JvmStatic
    fun show(text: String, duration: Int = Toast.LENGTH_SHORT) {
        if (duration==Toast.LENGTH_LONG){
            Toaster.showLong(text)
        }else {
            Toaster.showShort(text)
        }

    }

}